import datetime
from applications.extensions import db


class CmsCategory(db.Model):
	__tablename__ = 'cms_category'
	id = db.Column(db.Integer, primary_key=True, comment="栏目ID")
	parent_id = db.Column(db.Integer, comment="父级编号")
	category_name = db.Column(db.String(50), comment="栏目名称")
	ename = db.Column(db.String(50), comment="栏目拼音")
	sort = db.Column(db.Integer, comment="排序")
	thumb = db.Column(db.String(255), comment="栏目图片")
	status = db.Column(db.Integer, comment='状态(1开启,0关闭)')
	remark = db.Column(db.Text, comment="备注")
	category_url=db.Column(db.String(255), comment="栏目跳转链接")
	create_at = db.Column(db.DateTime, default=datetime.datetime.now, comment='创建时间')
	update_at = db.Column(db.DateTime, default=datetime.datetime.now, onupdate=datetime.datetime.now, comment='创建时间')